package com.wyx.serves;

import org.apache.ibatis.session.SqlSession;

import com.wyx.dao.UserDao;
import com.wyx.factory.SqlSessionFactoryUtil;

public class UserServes {
	SqlSession sqlSession=null;
	/**
	 * 用户注册
	 * @param username
	 * @param userpass
	 * @return
	 */
	public boolean userRegist(String username,String userpass){
		sqlSession=SqlSessionFactoryUtil.getSqlSession();
		UserDao userDao=sqlSession.getMapper(UserDao.class);
		boolean flag=userDao.userRegist(username, userpass);
		sqlSession.commit();
		return flag;
	}

}
